
package com.insigma.business.qrcode.soldier.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dao.CommonAuthInfoDao;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.soldier.entity.CommonAuthInfoDO;
import com.insigma.business.qrcode.soldier.request.CommonAuthInfoBSearcher;
import com.insigma.business.qrcode.soldier.service.CommonAuthInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("commonAuthInfoService")
public class CommonAuthInfoServiceImpl implements CommonAuthInfoService {

    @Autowired(required = false)
    private CommonAuthInfoDao commonAuthInfoDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<CommonAuthInfoDO> search(final CommonAuthInfoBSearcher commonAuthInfoBSearcher) {
        return commonAuthInfoDao.search(commonAuthInfoBSearcher);
    }
   
    @Override
    public CommonAuthInfoDO get(final String id){
        return commonAuthInfoDao.get(id);
    }

    
    @Override
    public Integer insert(final CommonAuthInfoDO commonAuthInfoDO){
        commonAuthInfoDO.setId(sequenceGenerator.genKey(SequenceNameConstant.COMMON_AUTH_INFO_ID));
        return commonAuthInfoDao.insert(commonAuthInfoDO);
    }

    
    @Override
    public Integer update(final CommonAuthInfoDO commonAuthInfoDO){
        return commonAuthInfoDao.update(commonAuthInfoDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return commonAuthInfoDao.delete(id,modifierType,modifierId);
    }

    @Override
    public CommonAuthInfoDO getByAuth(String auth) {
        return  commonAuthInfoDao.getByAuth(auth);
    }

}
